package com.example.single;

import com.zaxxer.hikari.util.UtilityElf;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author houyangfan
 * @version 1.0
 * @date 2022/10/5 14:16
 */
public class VoltaileTest {

    private static int num = 0;

    public static void main(String[] args) throws InterruptedException {

        for (int i = 0; i < 1000; i++) {
            new Thread(()->{
                while (num ==0 ){

                }
            }).start();
        }

        TimeUnit.SECONDS.sleep(1);

        num =1;
        System.out.println(num);
    }
}
